Banker's Algorithm

The banker’s algorithm is a resource allocation and deadlock avoidance algorithm that tests for safety by simulating the allocation for predetermined maximum possible amounts of all resources, then makes an “s-state” check to test for possible activities, before deciding whether allocation should be allowed to continue.
Banker’s algorithm is named so because it is used in banking system to check whether loan can be sanctioned to a person or not. Suppose there are n number of account holders in a bank and the total sum of their money is S. If a person applies for a loan then the bank first subtracts the loan amount from the total money that bank has and if the remaining amount is greater than S then only the loan is sanctioned. It is done because if all the account holders comes to withdraw their money then the bank can easily do it.
In other words, the bank would never allocate its money in such a way that it can no longer satisfy the needs of all its customers. The bank would try to be in safe state always.

Basic

Here welcome to the Banker's algorithm here you can see different sections and a whole table just configured for you , you can solve almost all the banker's questions

Tool Tips

Now if you want to know what the thing is or what is banker's algorithm or anything we have tooltip for you just hover over labels and headings and you will get your help

Input

You can input the values of the processes A B C in Allocation i.e number of resources available of each type and maximum resources a process is allowed to have also you can enter the currently available resources at Available, you can simulate the real examples of banker's algorithm.

Button panel

Here we have add button to add process , subtract button to remove process and submit button to get the simulation answer

Substraction

You can hit the minus button if you added some extra processes

Answers

Answers at bouncing bellow. Here it shows the answers in the other the process executed

Analysis of Banker's Algorithm approach

Characteristics of Banker's Algorithm
1. Keep many resources that satisfy the requirement of at least one client
2. Whenever a process gets all its resources, it needs to return them in a restricted period.
3. When a process requests a resource, it needs to wait
4. The system has a limited number of resources
5. Advance feature for max resource allocation

Disadvantage of Banker's algorithm
1. Does not allow the process to change its Maximum need while processing
2. It allows all requests to be granted in restricted time, but one year is a fixed period for that.
3. All processes must know and state their maximum resource needs in advance.

Summary:
1. Banker's algorithm is used majorly in the banking system to avoid deadlock. It helps you to identify whether a loan will be given or not.
2. Notations used in banker's algorithms are 1) Available 2) Max 3) Allocation 4) Need
3. Resource request algorithm enables you to represent the system behavior when a specific process makes a resource request.
4. Banker's algorithm keeps many resources that satisfy the requirement of at least one client
5. The biggest drawback of banker's algorithm this that it does not allow the process to change its Maximum need while processing.





abc